<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
		<!-- json  {}  [] -->
		<!-- python json.dumps()  json.loads() -->
		<!-- json  轻量级的数据交换格式 -->
		//obj --> json_str
		var cars = ["car1","car2"]
		var obj = {name:"wen",age:19}
		cars_json = JSON.stringify(cars)
		console.log(cars,typeof(cars),cars_json)
		obj_json = JSON.stringify(obj)
		console.log(obj,typeof(obj),obj_json)
		
		//json_str -->obj
		cars1 = JSON.parse(cars_json)
		console.log(cars_json,cars1)
		JSON.parse({"a":1})
		</script>
	</body>
</html>
